package com.java8.lambda.dome;

import java.util.function.BinaryOperator;

/**
 * <p>Description: [类功能描述]</p>
 * Created on 2020/2/25
 *
 * @author <a href="mailto: 819712047@qq.com">谢振东 </a>
 * @version 1.0
 */
public class test3 {
    /**
     * 3）.有两个参数，有返回值的：(x, y) -> x + y
     */
    public static void master() {
        System.out.println("-----------------test3.master()-----------------");

        BinaryOperator<Integer> binary = (x, y) -> x + y;
        // 3
        System.out.println(binary.apply(1, 2));
    }
}
